package com.board.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
@Data
@ApiModel(value = "更新角色资源参数对象")
public class ResourceRoleUpdateForm {
    @ApiModelProperty("角色id")
    @NotNull(message = "角色id不能为空")
    @Min(value = 0,message = "角色id不能小于0")
    private Integer roleId;
    @ApiModelProperty("该角色修改后的资源id集合")
    @Valid
    @Size(min = 0,message = "该角色修改后的资源id集合最少为0")
    private List<Integer> resourceIds;//该角色对应的所有资源id
}
